:root {
    --primary-color-start: #00d9ff;
    --primary-color-end: #1da3ec;
    --primary-gradient: linear-gradient(135deg, var(--primary-color-start), var(--primary-color-end));
    --success-color: #5FB878;
    --warning-color: #FFB800;
    --danger-color: #FF5722;
    --text-color: #333;
    --text-secondary-color: #666;
    --text-light-color: #999;
    --bg-color: #f5f7fa;
    --card-bg: #fff;
    --border-color: #e0e6ed;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-image:
            radial-gradient(circle at 10% 20%, rgba(0, 217, 255, 0.03) 0%, transparent 90%),
            radial-gradient(circle at 90% 80%, rgba(29, 163, 236, 0.03) 0%, transparent 90%);
    background-size: 100% 100%;
    background-attachment: fixed;
}

/* 基础组件样式 */
.layui-btn {
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    font-weight: 500;
    border: none;
}

.layui-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.layui-btn-primary {
    background-color: #f2f5f8;
    color: var(--text-color);
}

.layui-btn-primary:hover {
    background-color: #e6ebf1;
    color: var(--text-color);
}

.layui-btn-normal {
    background: var(--primary-gradient);
    color: #fff;
}

.layui-btn-normal:hover {
    background: linear-gradient(135deg, #00c4e6, #1a95d0);
    color: #fff;
}

.layui-btn .fa {
    margin-right: 6px;
}

.layui-input, .layui-textarea, .layui-select {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    height: 40px;
    transition: all 0.3s ease;
    font-size: 14px;
    background-color: #fff;
}

.layui-input:focus, .layui-textarea:focus, .layui-select:focus {
    border-color: var(--primary-color-start) !important;
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15);
    outline: none;
}

.layui-form-label {
    font-weight: 500;
    color: var(--text-color);
    padding: 9px 15px;
    width: 120px;
}

.layui-input-block {
    margin-left: 150px;
}

/* 状态标签样式 */
.status-tag {
    padding: 3px 10px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

.status-1 { background-color: var(--danger-color); } /* 未处理 - 红色 */
.status-2 { background-color: var(--warning-color); } /* 处理中 - 黄色 */
.status-3 { background-color: var(--success-color); } /* 已处理 - 绿色 */

/* 页面容器样式 */
.layuimini-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.layuimini-main {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    padding: 20px;
}

/* 统计卡片样式 */
.complaint-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.stats-card {
    flex: 1 1 calc(25% - 16px);
    min-width: 200px;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    border-top: 3px solid transparent;
    background-clip: padding-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
}

.stats-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-5px);
}

.stats-card .title {
    font-size: 14px;
    color: var(--text-secondary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.stats-card .title::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-color-start);
    margin-right: 6px;
}

.stats-card .value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 10px;
}

.stats-card .trend {
    font-size: 13px;
    display: flex;
    align-items: center;
    color: var(--text-light-color);
}

.stats-card .trend i {
    margin-right: 4px;
    font-size: 14px;
}

.stats-card .trend .up {
    color: var(--danger-color);
}

.stats-card .trend .down {
    color: var(--success-color);
}

/* 搜索区域样式 */
.table-search-fieldset {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    background-color: var(--card-bg);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.table-search-fieldset:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.05);
}

.table-search-fieldset legend {
    font-weight: 600;
    color: var(--primary-color-end);
    padding: 0 10px;
    font-size: 14px;
}

/* 表格样式 */
.layui-table-view {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.layui-table {
    border: none;
}

.layui-table thead tr {
    background-color: #f7f9fc;
}

.layui-table th {
    font-weight: 600;
    color: var(--text-secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 15px;
}

.layui-table td {
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 15px;
}

.layui-table tr:hover {
    background-color: #fcfdfe;
}

.layui-table-page {
    border-top: 1px solid var(--border-color);
    padding: 12px 15px;
    background-color: #fff;
}

/* 弹窗样式 */
.layui-layer {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
}

.layui-layer-title {
    background: var(--primary-gradient) !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0 20px !important;
    height: 48px !important;
    line-height: 48px !important;
    border-bottom: none !important;
}

.layui-layer-content {
    padding: 20px !important;
}

/* 表单样式 */
.layui-form-item {
    margin-bottom: 20px;
}

.layui-form-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

/* 图片上传预览样式 */
#image-preview-container {
    margin-top: 15px;
}

#image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-preview-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.image-preview-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.image-preview-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.image-preview-item:hover .remove-btn {
    opacity: 1;
}

/* 按钮组样式 */
.layui-form-item .layui-input-block {
    display: flex;
    gap: 10px;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .layui-form-label {
        width: 100%;
        display: block;
        padding: 0 0 8px 0;
    }

    .layui-input-block {
        margin-left: 0;
        width: 100%;
    }

    .complaint-stats {
        gap: 10px;
    }

    .stats-card {
        flex: 1 1 calc(50% - 10px);
        padding: 15px;
    }

    .stats-card .value {
        font-size: 24px;
    }

    .layuimini-container {
        padding: 10px;
    }

    .layuimini-main {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .stats-card {
        flex: 1 1 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 表格操作按钮样式 */
.layui-table-tool {
    border-bottom: 1px solid var(--border-color);
}

.layui-btn-xs {
    padding: 0 8px;
    height: 24px;
    line-height: 24px;
    font-size: 12px;
    border-radius: 4px;
}

/* 查看详情样式优化 */
#viewComplaint .layui-form-item {
    margin-bottom: 15px;
}

#viewComplaint .layui-form-label {
    width: 100px;
}

#viewComplaint .layui-input-block {
    margin-left: 130px;
}

#view-reply-container {
    margin-top: 10px;
}

#view-reply-container .layui-textarea {
    background-color: #f7f9fc;
    border-color: #e6eef7;
    color: var(--text-secondary-color);
}